package com.homedo.odin.solution.service;

import com.homedo.core.common.base.service.BaseService;
import com.homedo.odin.solution.dao.UserSpecificationMapper;
import com.homedo.odin.solution.model.entity.UserSpecification;
import org.springframework.stereotype.Service;

/**
 * <p> 用户规范下载收藏关系表 服务实现类 </p>
 *
 * @author HarveyDing
 * @since 2018-03-08
 */
@Service
public class UserSpecificationServiceImpl extends BaseService<UserSpecificationMapper, UserSpecification> {

    public UserSpecification getUserSpecification(Integer userId, Long specificationId, Integer actionType) {
        return baseMapper.getUserSpecification(userId, specificationId, actionType);

    }

    public Integer queryFreeSpecificationDownloadCount(Integer userId, Integer actionType) {
        return baseMapper.queryFreeSpecificationDownloadCount(userId, actionType);
    }

    public void addUserSpecification(UserSpecification uSpecification) {
        baseMapper.insert(uSpecification);
    }
}
